package com.jzo2o.customer.controller.register;

import com.jzo2o.customer.model.dto.request.InstitutionRegisterReqDTO;
import com.jzo2o.customer.model.dto.response.RegisterDTO;
import com.jzo2o.customer.service.IRegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author itcast
 */
@RestController("RegisterController")
@RequestMapping("/open")
@Api(tags = "注册相关接口")
public class RegisterController {

    @Autowired
    private IRegisterService registerService;

    /**
     * 机构人员注册接口
     * @param institutionRegisterReqDTO
     * @return
     */
    @PostMapping("/serve-provider/institution/register")
    @ApiOperation("机构人员注册接口")
    public RegisterDTO registerInstitution(@RequestBody InstitutionRegisterReqDTO institutionRegisterReqDTO) {
        registerService.registerInstitution(institutionRegisterReqDTO);
        return RegisterDTO.success();
    }
}
